import Vue from 'vue'
import Vuex from 'vuex'
import * as actions from './actions'
import * as mutations from './mutations'
import * as getters from './getters'
import createLogger from 'vuex/dist/logger'
import notify from './modules/notify'
import user from './modules/user'
import gooItem from './modules/gooItem'

Vue.use(Vuex)

//开发模式启动调试
const debug = process.env.NODE_ENV !== 'production'

export default new Vuex.Store({
  actions,
  mutations,
  getters,
  modules: {
    notify,
    user,
    gooItem
  },
  strict: debug,
  plugins: debug ? [createLogger()] : []
})

